﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="GUI._Default" %>

<%@ Register Src="Home/UC/UC_MenuNavigation.ascx" TagName="UC_MenuNavigation" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <uc1:UC_MenuNavigation ID="UC_MenuNavigation1" runat="server" />
    <div class="title_content">
        Trang chủ
    </div>
    <div class="border_content">
        <!-- slide -->
        <div>
            <div class="bx-wrapper" style="width: auto; position: relative;">
                <div class="bx-window" style="position: relative; overflow: hidden; width: 100%;">
                    <div class="view">
                        <div style="text-align: right; padding-right: 5px; margin-bottom: 20px; margin-top: 3px;">
                            <div style="margin-left: 10px; float: right;">
                                Sắp xếp
                                <select name="SortBy" id="SortBy" class="inputbox" style="width: 165px;">
                                    <option selected="selected" value="-1">Chọn cách sắp xếp</option>
                                    <option value="0">Giá từ Cao-Thấp</option>
                                    <option value="1">Giá từ Thấp-Cao</option>
                                    <option value="2">Tên sản phẩm A-Z</option>
                                    <option value="3">Tên sản phẩm Z-A</option>
                                    <option value="4">Xem nhiều nhất</option>
                                    <option value="5">Đặt mua nhiều</option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <asp:DataList ID="DatalistDanhSachSanPham" runat="server" CellPadding="4" RepeatColumns="2"
                        Width="50%" OnItemCommand="DatalistDanhSachSanPham_ItemCommand">
                        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                        <ItemStyle BackColor="White" />
                        <ItemTemplate>
                            <asp:Label runat="server" ID="LabaleMaSanPham" Visible="false" Text='<%# Eval("MaSanPham") %>'></asp:Label>
                            <div class="table1 margin-right10">
                                <img alt="top=grid" style="vertical-align: text-bottom;" src="Home/css/images/top-gird.gif" />
                                <table cellpadding="0" cellspacing="0" class="sp-gird">
                                    <tbody>
                                        <tr style="height: 140px; vertical-align: text-top;" valign="top">
                                            <td>
                                                <a id="LinkChiTietSanPham" href="ChiTietSanPham.aspx?MaSanPham=<%# Eval("MaSanPham") %>">
                                                    <img id="Products_Image4" title="<%# Eval("TenSanPham") %>" class="img-sp" src="<%# "Images\\" + LoadHinhAnh(Eval("MaSanPham")) %>"
                                                        style="border-width: 0px;" alt='' width="140px" height="140px" /></a>
                                            </td>
                                            <td style="text-align: right; padding-right: 25px; width: 145px;">
                                                <h2 class="h2">
                                                    <asp:Label ID="LabelGiaBan" runat="server" ForeColor="#488308"><%# Eval("GiaBan", "{0:0,0 VNĐ}")%></asp:Label>
                                                    <br />
                                                    <img src="Home/images/quatang.jpg" alt="dthoa" style="width: 80px; height: 43px;"
                                                        title=""></h2>
                                                <div class="btn-dathang" style="margin-top: 10px;">
                                                    <asp:LinkButton ID="btndathang" CommandArgument='<%# Eval("MaSanPham") %>' CommandName='them'
                                                        runat="server">ĐẶT HÀNG</asp:LinkButton>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr style="height: 60px; vertical-align: text-top;" valign="top">
                                            <td colspan="2" style="padding: 5px; vertical-align: text-top;" valign="top">
                                                <h1 class="h1">
                                                    <a id="LinkChiTietSanPham2" href="ChiTietSanPham.aspx?MaSanPham=<%# Eval("MaSanPham") %>">
                                                        <%# Eval("TenSanPham") %></a></h1>
                                                <strong>Nhà sản xuất:</strong>
                                                <%# LoadNhaSanXuat(Eval("MaNhaSanXuat")) %>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div class="sendmail">
                                    <span class="btn-addprice">Số lượt xem:
                                        <%# Eval("SoLuotXem") %></span> <span class="email">| Số lượt mua:
                                            <%# Eval("SoLuotMua") %></span>
                                </div>
                            </div>
                        </ItemTemplate>
                        <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                    </asp:DataList>
                </div>
            </div>
        </div>
        <!-- end slide -->
        <div class="clear">
        </div>
    </div>
</asp:Content>
